<template>
  <img :src="app.icon" class="app-img" alt="" @click.stop="showMusic">
</template>

<script setup>
import eventBus from '@/utils/eventBus';

const props = defineProps({
  app: {
    type: Object,
    default: () => {},
  }
})

const showMusic = () => {
  eventBus.emit("playOrPause");
}
</script>

<style lang="less" scoped>
.tiangou {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  .text {
    margin: 20px 40px;
    user-select: text;
    p {
      line-height: 2;
      text-align: justify;
      // text-align-last: center;
      &:nth-of-type(1) {
        text-align: center;
      }
    }
  }
  button {
    border: 0;
    margin: 0 0.3rem;
    padding: 0;
    width: 60px;
    height: 60px;
    color: transparent;
    border-radius: 100%;
    background-image: url();
    background-size: cover;
    background-position: 50% 50%;
    background-repeat: no-repeat;
    box-shadow: 0 0 0.2rem rgba(0, 21, 110, .1);
    cursor: pointer;
    outline: 0;
    &:hover {
      box-shadow: 0 0 1.2rem var(--primary-color);
    }
  }
}
</style>